-- GENERATED SPELL FOR [Defendo-tank 66D] --


function spell0_25758(pUnit, Event) --@Machine Gun,n/a--
pUnit:FullCastSpellOnTarget(49981,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25758', 5000, 1)
end

function spell1_25758(pUnit, Event) --@Machine Gun,n/a--
pUnit:FullCastSpellOnTarget(51504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25758', 575, 1)
end

function spell2_25758(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(49987,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25758', 2000, 1)
end

function spell3_25758(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(51502,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25758', 579, 1)
end

function Sorts_25758(pUnit, Event)
local choix_sorts_25758 = math.random(0, 3)
if choix_sorts_25758 == 0 then
pUnit:RegisterEvent('spell0_25758', 1, 1)
end
if choix_sorts_25758 == 1 then
pUnit:RegisterEvent('spell1_25758', 1, 1)
end
if choix_sorts_25758 == 2 then
pUnit:RegisterEvent('spell2_25758', 1, 1)
end
if choix_sorts_25758 == 3 then
pUnit:RegisterEvent('spell3_25758', 1, 1)
end
end

function mob25758_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25758', math.random(1500, 3000), 1)
end

function mob25758_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25758_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25758_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25758, 1, 'mob25758_Action')
RegisterUnitEvent(25758, 2, 'mob25758_Leave')
RegisterUnitEvent(25758, 3, 'mob25758_Kill')
RegisterUnitEvent(25758, 4, 'mob25758_Die')
